Skip to main content

All Questions

0votes
0answers
32views

awk output not in columns when moved to log [duplicate]

I have an awk command piped to the output of another command | awk {'print $2,$3'}. When I run this command the output displays the data in columns, of the columns as I would expect column2 column3 a ...
mcv110's user avatar
1vote
2answers
163views

How to remove unneccessary spaces from table output in shell while still keeping columns aligned?

Below command outputs a table of space delimited text, is there a tool to remove the unnecessary spacing here while still keeping the columns aligned? $ sudo ss -ltpn State Recv-Q Send-Q ...
Elijah Lynn's user avatar
0votes
1answer
2kviews

Clean formatting of output within bash scripts

I ran across a problem formatting the output during runtime while preserving the format of the code in some scripts. The below works for me, just wanna check that it's reasonable? It seems to dirty up ...
null's user avatar
  • 113
1vote
3answers
527views

Bash output two results next to each other

I have an out from xmllint and egrep that I would like to print two fields next to each other. e.g. (xmlinput) xmllint --format | egrep reference\|sourcefile <reference>ItemX</reference> &...
user205316's user avatar
3votes
1answer
7kviews

How to create a list of email addresses from ldapsearch result for further processing?

For an automated mailing and to notify user, respective members of a specific group, I am looking for commands or a single command line which provides a list of email addresses and which can be used ...
U880D's user avatar
  • 1,197
-1votes
1answer
650views

Human-readable `du` with finer grain

I sometimes wish human-readable du -h option to be more fine-grained while still human-readable. Instead of showing: 14G it would show something like: 14G 236M 788k 110b Is there an easy / ...
iago-lito's user avatar
1vote
3answers
419views

Padding output with newlines

I'd like to make fixed height output from any command using piping: some_command | magic_command -40 If, for example, some_command prints 3 lines, magic_command should add 37 newlines, or if ...
login's user avatar
2votes
2answers
230views

How do I echo a line with linebreak at the end at window border? [duplicate]

I would like to echo a list all in one line, TAB separated (like ls does with files in one folder) for i in one two some_are_very_long_stuff b c; do echo $i; done will print one line per word: one ...
rubo77's user avatar
  • 30.2k
41votes
6answers
65kviews

How do I add newlines between lines printed on the command line?

Mail logs are incredibly difficult to read. How could I output a blank line between each line printed on the command line? For example, say I'm grep-ing the log. That way, multiple wrapped lines aren'...
xenoterracide's user avatar

close